///////////////////////////////////////////////////////////
//  ListPersistent.h
//  Implementation of the Class ListPersistent
//  Created on:      23-sep-2007 21:26:26
///////////////////////////////////////////////////////////

#if !defined(EA_C268B9D1_380C_4e1e_B4B1_16803FFC11D8__INCLUDED_)
#define EA_C268B9D1_380C_4e1e_B4B1_16803FFC11D8__INCLUDED_

class ListPersistent;

#include "../../common/fuentes/Persistent.h"
#include "../../indexado/fuentes/NumberUtil.h"
#include <vector>



#define OPERADOR_NULO 0
#define OPERADOR_MAYOR 1
#define OPERADOR_MAYOR_IGUAL 2
#define OPERADOR_IGUAL 3
#define OPERADOR_MENOR 4
#define OPERADOR_MENOR_IGUAL 5
#define OPERADOR_DISTINTO 6


class ListPersistent
{

public:
	ListPersistent();
	ListPersistent(const ListPersistent& right);
	virtual ~ListPersistent();
	void insertSort(Persistent* object);
	int getSize();
	std::string getAtributte();
	Persistent* getPersistent(int i);
	void setAtributte(std::string at);
	Persistent* getFirst();
	Persistent* getLast();
	bool is(Persistent* object);
	void sort(std::string newAtributte);
	
	const ListPersistent &operator=(const ListPersistent &right);

	bool operator()(Persistent *left, Persistent *rigth);
	
	void clear();
	int erase(int i);
	int indexOf(Persistent* object);
	
private:
	std::string atributte;
	int size;
	std::string newSortedAtributte;
	std::vector<Persistent*> lsPersistent;
	bool Compare(Persistent *left, Persistent *rigth);

	
	
	
};
#endif // !defined(EA_C268B9D1_380C_4e1e_B4B1_16803FFC11D8__INCLUDED_)
